let onePostApp = new Vue({
    el: "#onePostApp",
    data: {
        post: {}
    },
    methods: {
        loadPost: function () {
            let pid = location.search;
            if(!pid){
                return;
            }
            pid=pid.substring(1);
            axios({
                url: "/boke/post/labels/one/" + pid,
                method: "get",

            }).then(function (response) {
                console.log("成功加载帖子!!!");
                console.log(response.status);
                if (response.status == 200) {
                    onePostApp.post = response.data;
                    //对象添加持续时间属性
                    addDuration();
                }
            })
        }
    },
    created: function () {
        console.log("加载帖子.....")
        this.loadPost(1);
    }
})